//
//  SelectTagsCellFlowLayout.h
//  PigMarket
//
//  Created by Felix on 2019/3/25.
//  Copyright © 2019 felix.pigmarket.oc. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@protocol SelectTagsCellFlowLayoutDelegate <NSObject>
@optional
// 用协议传回 item 的内容,用于计算 item 宽度
- (NSString *)collectionViewItemSizeWithIndexPath:(NSIndexPath *)indexPath;
// 用协议传回 headerSize 的 size
- (CGSize)collectionViewDynamicHeaderSizeWithIndexPath:(NSIndexPath *)indexPath;
// 用协议传回 footerSize 的 size
- (CGSize)collectionViewDynamicFooterSizeWithIndexPath:(NSIndexPath *)indexPath;

@end

@interface SelectTagsCellFlowLayout : UICollectionViewFlowLayout

@property (nonatomic, weak) id<SelectTagsCellFlowLayoutDelegate> delegate;

/* header 高度（默认0.0）*/
@property (nonatomic , assign) CGFloat headerViewHeight;
/* footer 高度（默认0.0）*/
@property (nonatomic , assign) CGFloat footerViewHeight;
/* item 高度 (默认30) */
@property (nonatomic , assign) CGFloat itemHeight;
/** item行间距  默认4*/
@property (nonatomic, assign) CGFloat lineSpacing;
/** item间距  默认4*/
@property (nonatomic, assign) CGFloat interitemSpacing;
/* item Label Font（默认系统字体12）*/
@property (nonatomic , copy) UIFont *labelFont;
/* item 边距缩进（默认UIEdgeInsetsZero）*/
@property (nonatomic, assign) UIEdgeInsets itemInset;

/** itemView最大宽度 */
@property (nonatomic, assign) CGFloat itemViewMaxWidth;

@end

NS_ASSUME_NONNULL_END
